<%-- 
    Document   : rubrique
    Created on : 30 mars 2013, 15:12:36
    Author     : Alice
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>

<jsp:include page="header.jsp"></jsp:include>
<s:div id="bloc_contenu_left">
    <c:forEach items="${products}" var="product" >
        <c:set var="idProduct" value="${product.idProductType}"/>
        <s:a action="ficheProduit">
            <s:param name="idProduct"><c:out value="${idProduct}"/></s:param>
            <s:div id="bloc_produit_index">
                <table border="0">
                    <tr>
                        <td valign="top" class="td_miniature"><img src="pages/img/img_produit_type/${product.idProductType}.jpg" width="78%" height="78%"/></td>
                        <td valign="top"><b>${product.title}
                                <br /><br />
                                <s:if test="#session['USER'] != null">
                                    <s:if test="#session['USER'].getCountry().devise=='USD'">
                                        <fmt:formatNumber maxFractionDigits="2"><c:out value="${product.price*sessionScope['RATE']}" /></fmt:formatNumber> $
                                    </s:if>
                                    <s:else>
                                        ${product.price} €
                                    </s:else>
                                </s:if>
                                <s:else>
                                    ${product.price} €
                                </s:else>

                            </b>
                        </td>
                    </tr>

                </table>
            </s:div>
        </s:a>
    </c:forEach>

</s:div>

<jsp:include page="footer.jsp"></jsp:include>
